#pragma once
#include <list>
#include "TesInclude.h"
#include "TesToken.h"


class TES_EXPORT TesTokenStream
{
public:
	TesTokenStream( const list<TesToken> & tokens );

	const TesToken &					GetCurrent() const								{ return *mCurrent; }
	const TesLexLocation &				GetCurrentLocation() const						{ return mCurrent->Location; }
	bool								IsEndOfStream() const;

	const TesToken &					Peek( int count = 1 ) const;
	int									SearchForward( TesTokenType type ) const;
	void								Next();

private:
	const list<TesToken> &				mTokens;
	list<TesToken>::const_iterator		mCurrent;
};